﻿from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'Hanabi.views.home', name='home'),
    # url(r'^Hanabi/', include('Hanabi.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:

    url(r'^admin/', include(admin.site.urls)),
    #ir al home
    url(r'^dashboard/home', 'user_auth.views.home'),

    #manejo de sesion
	url(r'^dashboard/$', 'user_auth.views.validate_user'),
	url(r'^dashboard/auth/', 'user_auth.views.auth'),
    url(r'^dashboard/loggout', 'user_auth.views.logout'),

    #manejo de usuarios
    url(r'^dashboard/users', 'user_auth.views.users'),
    url(r'^dashboard/getUser$', 'user_auth.views.get_user'),
    url(r'^dashboard/addUser/', 'user_auth.views.add_user'),
    url(r'^dashboard/updateUser/', 'user_auth.views.update_user'),
    url(r'^dashboard/deleteEditingUser/', 'user_auth.views.delete_editing_userdata'),
    url(r'^dashboard/user_query/', 'user_auth.views.user_runquery'),

    #manejo de articulos
    url(r'^dashboard/articles', 'user_auth.views.articles'),
    url(r'^dashboard/getArticle$', 'user_auth.views.get_article'),
    url(r'^dashboard/addArticle/', 'user_auth.views.add_article'),
    url(r'^dashboard/updateArticle/', 'user_auth.views.update_article'),
    url(r'^dashboard/deleteArticle/', 'user_auth.views.delete_article'),

    #manejo de foros
    url(r'^dashboard/forums', 'user_auth.views.forums'),
    url(r'^dashboard/getForum$', 'user_auth.views.get_forum'),
    url(r'^dashboard/addForum/', 'user_auth.views.add_forum'),
    url(r'^dashboard/updateForum/', 'user_auth.views.update_forum'),
    url(r'^dashboard/deleteForum/', 'user_auth.views.delete_forum'),

    #Favicon de la aplicacion
    (r'^favicon\.ico$', 'django.views.generic.simple.redirect_to', {'url': '/static/images/favicon.ico'}),
)

